package com.movie.api.mapper;

import com.movie.api.model.entity.OrderVIP;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

@Mapper
public interface AliPayMapper {
    @Insert ( "insert into `order` (id, user_id, trade_no, out_trade_no, payment_time) values (#{id},#{userId},#{tradeNo},#{outTradeNo},#{paymentTime});" )
    int insert(OrderVIP orderVIP);

    @Select ( "select * from `order` where user_id = #{userId};" )
    OrderVIP getByUserId(String userId);
}
